<%--
  Created by IntelliJ IDEA.
  User: zhanzhongxin
  Date: 2021/8/5
  Time: 9:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.Date" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    final Date date = new Date();
//    request.setAttribute("name", "zhangsan");
//    session.setAttribute("key", "session");
//    application.setAttribute("key", "application");

    pageContext.setAttribute("k", "page");
    pageContext.setAttribute("k", "request", PageContext.REQUEST_SCOPE);
    pageContext.setAttribute("k", "session", PageContext.SESSION_SCOPE);
    pageContext.setAttribute("k", "application", PageContext.APPLICATION_SCOPE);

%>

<%--<%=date%>--%>
<%--<%=request.getAttribute("name")%>--%>
<!--page,request,session,application-->
<h1>全域查找：${k}</h1>
<h1>page域：${pageScope.k}</h1>
<h1>request域：${requestScope.k}</h1>
<h1>session域：${sessionScope.k}</h1>
<h1>application域：${applicationScope.k}</h1>
</body>
</html>
